home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Table / Sources / Scroller.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.0 KB  |  64 lines  |  [TEXT/CWIE]

  1. //========================================================================================
  2. //
  3. //    File:                Scroller.h
  4. //    Release Version:    $ ODF 2 $  
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SCROLLER_H
  11. #define SCROLLER_H
  12.  
  13. #ifndef FWSCROLR_H
  14. #include "FWScrolr.h"
  15. #endif
  16.  
  17. //========================================================================================
  18. //    Forward Class Declarations
  19. //========================================================================================
  20.  
  21. class CTablePartContent;
  22. class CTableFrame;
  23.  
  24. //========================================================================================
  25. //    class CTableScroller
  26. //========================================================================================
  27.  
  28. class CTableScroller : public FW_CScrollBarScroller
  29. {
  30. public:
  31.     FW_DECLARE_CLASS
  32.     FW_DECLARE_AUTO(CTableScroller)
  33.  
  34. //----------------------------------------------------------------------------------------
  35. //    Initialization/Destruction
  36. //
  37. public:
  38.     CTableScroller(Environment* ev);
  39.     virtual ~CTableScroller();
  40.  
  41.     virtual FW_CPoint        TranslationToPixels(Environment* ev, const FW_CPoint& translation) const;
  42.     virtual FW_CRect        GetScrollingArea(Environment* ev) const;
  43.     virtual FW_Fixed        CalcMaxTranslation(Environment* ev, FW_Fixed scrollingArea, FW_XYSelector direction);
  44.  
  45.     // ----- Archiving -----
  46.     static void*             Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  47.     static void                Destroy(void* object, FW_ClassTypeConstant type);    
  48.     virtual void            InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
  49.  
  50. //----------------------------------------------------------------------------------------
  51. //    New API
  52. //
  53. public:
  54.     FW_CPoint                PixelsToTranslation(const FW_CPoint& PixelOffset) const;
  55.  
  56. //----------------------------------------------------------------------------------------
  57. //    Data Members
  58. //
  59. private:
  60.     CTablePartContent*        fTableContent;
  61.     CTableFrame*            fTableFrame;
  62. };
  63.  
  64. #endif